package com.wasu.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>------------------------------------------------------
 * <p>Copyright (C) 2018 wasu company, All rights reserved.
 * <p>------------------------------------------------------
 * <p> 区域信息与是否ip优先
 * <p>
 *
 * @author Created by 罗长庚
 * @date on 2018/10/17.
 */
public class DicList implements Parcelable {
    //    {
//        "ret": 0,
//        "retInfo": "成功!",
//        "dicinfo": [
//            {
//                "id": 1,
//                "applicationName": "4k-launcher",
//                "dictKey": "ipfirst",
//                "dictValue": "0",
//                "state": "1",
//                "remark": "当 dictValue==1时表示ip优先播放（终端需要过滤掉8M以上的超清码率信息） 当 dictValue==0时表示按照码率就高原则播放",
//                "updateTime": "2018-10-16 14:53:08",
//                "dictCategory": "01#4001",
//                "dictCategoryName": "杭州市区ip优先：否"
//            }
//        ]
//    }
    private int ret;

    private String retInfo;

    private List<DicInfo> dicInfo;

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public String getRetInfo() {
        return retInfo;
    }

    public void setRetInfo(String retInfo) {
        this.retInfo = retInfo;
    }

    public List<DicInfo> getDicInfo() {
        return dicInfo;
    }

    public void setDicInfo(List<DicInfo> dicInfo) {
        this.dicInfo = dicInfo;
    }

    @Override
    public String toString() {
        return "DicList{" +
                "ret=" + ret +
                ", retInfo='" + retInfo + '\'' +
                ", dicInfo=" + dicInfo +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.ret);
        dest.writeString(this.retInfo);
        dest.writeList(this.dicInfo);
    }

    public DicList() {
    }

    protected DicList(Parcel in) {
        this.ret = in.readInt();
        this.retInfo = in.readString();
        this.dicInfo = new ArrayList<DicInfo>();
        in.readList(this.dicInfo, DicInfo.class.getClassLoader());
    }

    public static final Creator<DicList> CREATOR = new Creator<DicList>() {
        @Override
        public DicList createFromParcel(Parcel source) {
            return new DicList(source);
        }

        @Override
        public DicList[] newArray(int size) {
            return new DicList[size];
        }
    };
}
